<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/3/7
  Time: 10:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="col-md-12 text-right">

    <%--当用户登录后，不显示登录注册按钮，没有登录的时候才显示
    if(user != null){
       显示 个人中心
    }else{
     显示  登录 注册
    }
    --%>

    <ol class="breadcrumb" id="info">

        <li><span>${user.username}您好，欢迎来到服装专卖店！</span></li>
        <c:choose>

            <c:when test="${empty user}">
                <li id="li1">
                    <a href="${root}/login.jsp" data-toggle="modal">[登录]</a>&nbsp;<a href="${root}/register.jsp" data-toggle="modal">[新用户注册]</a>
                </li>
            </c:when>
            <c:otherwise>
                <li>
                    <a href="${root}/logout" onclick="showCart()">退出 <span class="badge" id="cartBadge"></span></a>
                </li>
                <li>
                    <a href="#" onclick="showCart()">个人中心 <span class="badge" id="cartBadge"></span></a>
                </li>
            </c:otherwise>
        </c:choose>
        <li><a href="#" onclick="showCart()">购物车 <span class="badge" id="cartBadge"></span></a></li>

    </ol>

</div>
